package com.datang.petstore.service.impl;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-11-11 11:43
 * @notify
 * @version 1.0
 */

import com.datang.petstore.entity.ManageUser;
import com.datang.petstore.entity.ManageUserExample;
import com.datang.petstore.generatemapper.ManageUserMapper;
import com.datang.petstore.service.ManageUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManageUserServiceImpl implements ManageUserService {

    @Autowired
    private ManageUserMapper manageUserMapper;

    public List<ManageUser> getManageUser(ManageUser manageUser) {
        ManageUserExample manageUserExample = new ManageUserExample();
        ManageUserExample.Criteria criteria = manageUserExample.createCriteria();
        criteria.andUsernameEqualTo(manageUser.getUsername());
        criteria.andPasswordEqualTo(manageUser.getPassword());
        List<ManageUser> manageUsers = manageUserMapper.selectByExample(manageUserExample);
        return manageUsers;
    }
}
